package intercepor

import (
	"context"
	"google.golang.org/grpc"
	"log"
)

func OrderUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
	// Pre-processor phase

	log.Printf("[intercepor Method ]: " + method)
	// Invoking the remote method
	err := invoker(ctx, method, req, reply, cc, opts...)
	// Post-processor phase
	log.Println("[interceptor Reply ]: ", reply)
	return err
}
